package com.itemdoc.organ.config;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * 
 * @author Administrator
 *
 */
@Component
public class SmsConfig implements InitializingBean {
	/**
	 * 地域内的产品ID
	 */
	@Value("${aliyun.regionId}")
	private String aliyun_regionid;
	 /**
	  * 阿里云主账号AccessKey AccessKeyId
	 */
	@Value("${aliyun.smsAccount}")
	private String aliyun_keyid;
	/**
	 * 阿里云主账号AccessKey AccessKeySecret
	 */
	@Value("${aliyun.smsPassword}")
	private String aliyun_keysecret;
	
	public static String ALIYUN_REGIONID;
	
	public static String ALIYUN_ACCESS_KEY_ID;
	
	public static String ALIYUN_ACCESS_KEY_SECRET;
	
	@Override
	public void afterPropertiesSet() throws Exception {
		ALIYUN_REGIONID = aliyun_regionid;
		ALIYUN_ACCESS_KEY_ID = aliyun_keyid;
		ALIYUN_ACCESS_KEY_SECRET = aliyun_keysecret;
	}
}
